<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<style>
    .bootbox-close-button {
        width: 19px;
        height: 19px;
        border: none;
        cursor: pointer;
        -webkit-appearance: none;
        float: right;
        top: 4px;
        left: -5px;
        position: relative;
        background: #E9F5FF url("assets/img/nav-img/icon_close.png") no-repeat 0 0;
    }
    .resetPassword .modal-dialog {
        width: 60% !important;
    }

    .resetPassword .modal-body {
        padding-bottom: 0;
    }
    input[type="text"],select,input[type="password"]{
        height: 30px!important;
        border-radius: 5px!important;
    }
    .resetPassword .widget-body {
        box-shadow: none;
        background-color: #fff;
    }
</style>
<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
        <div class="widget flat radius-bordered">
            <div class="widget-body">
                <div id="registration-form">
                    <form role="form" action="sysAdminUserController/resetPassword.do" responseType="JSON" method="post"
                          id="resetPasswordForm">

                        <input type="hidden" class="targetDataId" name="targetDataId"  value="${editEntity.id}">
                        <div class="col-lg-12 col-sm-12 col-xs-12">
                            <div class="form-group" style="margin-bottom: 20px;overflow: hidden;">
                                <label class="col-lg-5 col-sm-5 col-xs-5 control-label no-padding-right text-align-right">账号名称：</label>
                                <div class="col-lg-3 col-sm-3 col-xs-3">
                                    <label class="col-lg-4 col-sm-4 col-xs-4 control-label no-padding-right">${editEntity.userName}</label>
                                </div>
                            </div>
                        </div>

                        <div class="col-lg-12 col-sm-12 col-xs-12">
                            <div class="form-group" style="margin-bottom: 20px;overflow: hidden;">
                                <label style="line-height: 30px;" class="col-lg-5 col-sm-5 col-xs-5 control-label no-padding-right text-align-right"><span
                                        class="red text-align-vertical-center">*</span>新密码：</label>
                                <div class="col-lg-3 col-sm-3 col-xs-3">
                                    <input type="password" class="form-control" required="required" name="newPassword" placeholder="新密码">
                                </div>
                            </div>
                        </div>

                        <div class="col-lg-12 col-sm-12 col-xs-12">
                            <div class="form-group" style="margin-bottom: 20px;overflow: hidden;">
                                <label style="line-height: 30px;"
                                       class="col-lg-5 col-sm-5 col-xs-5 control-label no-padding-right text-align-right"><span
                                        class="red text-align-vertical-center">*</span>重复密码：</label>
                                <div class="col-lg-3 col-sm-3 col-xs-3">
                                    <input type="password" class="form-control" required="required" name="confirmPassowrd" placeholder="重复密码">
                                </div>
                            </div>
                        </div>

                        <div class="col-lg-12 col-sm-12 col-xs-12" style="margin-bottom: 20px">
                            <div class="text-align-center">
                                <button style="min-width: 80px;margin-right:20px;" type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">提交</button>
                                <button style="width: 80px" type="button" class="btn btn-blue" data-dismiss="modal" onclick="closeDialog()">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    inintValidatorForm($("#resetPasswordForm"))
    $("#resetPasswordForm").on("ajaxSubmitCallback", function (event, res) {
        if (res.resCode == 200) {
            bootbox.hideAll();
            logger.info(res.resMsg, true);
            toView('sysAdminUserController/sysAdminUserList.do',true,'POST',{pageSize:10})
        } else {
            logger.error(res.resMsg);
        }
    });

    function closeDialog() {
        $("#resetPasswordForm").parents(".modal-content").find(".modal-header .close").click();
    }
</script>